spam = ['cat', 'bat', 78, 'rat']

print(spam[-1])
print(spam[-2])

# 切片

print(spam[1:4])
print(spam[1:])
print(spam[:3])
print(len(spam))
print(spam + spam)
print(spam * 3)

del spam[2]

print(spam)

for i in range(len(spam)):
  print(spam[i])

print('cat' in spam)
print('cat' not in spam)
